#!/bin/sh
  cp $DRACOSRC_PKG_SRC_DIR/logo_linux_clut224.ppm drivers/video/logo/ || exit 1

cp $DRACOSRC_PKG_SRC_DIR/config .config || exit 1

sed -i 's/EXTRAVERSION = '${DRACOSRC_PKG_KERNEL_PATCH}'/EXTRAVERSION = /g' Makefile

make oldconfig

if [ "${NOMAKE}" = 1 ]; then
  echo "=> Build aborted"
  exit 1
fi

make -j3 bzImage || exit 1

mkdir -p $DRACOSRC_PKG/boot
cp arch/*/boot/bzImage $DRACOSRC_PKG/boot/vmlinuz-usb || exit

